package com.cc.chioceFileListView;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;

public class BitmapOptimization {
	
	public static Bitmap getBitmap(String path, int width){
		BitmapFactory.Options options = new Options();
		options.inJustDecodeBounds = true;
		BitmapFactory.decodeFile(path, options);
		options.inJustDecodeBounds = false;
		options.inSampleSize = options.outWidth / width;
		return BitmapFactory.decodeFile(path, options);
	}
	
}
